<template>
    <div class='home-container'>
        <SideNav :openeds="openeds" :activeTab="activeTab"></SideNav>
        <div class='right-container'>
            <Header class="header" :headerList="headerList"></Header>
            <div class="right-content">
                <Warn :welcomeInfo="welcomeInfo"></Warn>
                <Welcome :welcomeInfo="welcomeInfo"></Welcome>
            </div>

            <!-- 内容区域 -->
            <div class="content">
                <router-view></router-view>
            </div>
        </div>
    </div>
</template>

<script>
import Warn from '../../src/components/Warn'
import Welcome from '../../src/components/Welcome'
import Header from '../../src/components/Header'
import SideNav from '../../src/components/SideNav'
import {
    geTeacherHomePage
} from '@/api/home'
export default {
    name: 'home',
    data() {
        return {
            headerList: ['会员', '欢迎', '欢迎页'],
            openeds: ['1', '1-1'],
            activeTab: 'Member',
            welcomeInfo: {}
        }
    },
    mounted() {
        this.geTeacherHomePage()
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath)
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath)
        },
        geTeacherHomePage() {
            geTeacherHomePage({}).then(res => {
                if (res.code == 1) {
                    this.welcomeInfo = res.data
                }
            })
        }
    },
    components: {
        Warn,
        Welcome,
        Header,
        SideNav
    }
}

</script>
<style lang="less" scoped>
    @import url('../../src/assets/less/Mixins.less');
    @import url('../../src/assets/less/common.less');

    html,
    body {
        height: 100%
    }

</style>
<style lang="less">
    .left-container {
        ul {
            background-color: #22345E
        }
    }

    // 日历
    .el-picker-panel__body {
        font-family: PingFang-SC-Regular !important;
    }

    @import url('../../src/assets/less/override-element-ui.less');

</style>
